Monadic Type Systems: Pure Type Systems for Impure Settings

نویسندگان

  • Gilles Barthe
  • John Hatcliff
  • Peter Thiemann
چکیده

Pure type systems and computational monads are two parameterized frameworks that have proved to be quite useful in both theoretical and practical applications. We join the foundational concepts of both of these to obtain monadic type systems. Essentially, monadic type systems inherit the parameterized higher-order type structure of pure type systems and the monadic term and type structure used to capture computational eeects in the theory of computational monads. We demonstrate that monadic type systems nicely characterize previous work and suggest how they can support several new theoretical and practical applications. A technical foundation for monadic type systems is laid by recasting and scaling up the main results from pure type systems (connuence, subject reduction, strong normalisation for particular classes of systems, etc.) and from operational presentations of computational monads (notions of operational equivalence based on applicative similarity, co-induction proof techniques). We demonstrate the use of monadic type systems with case studies of several call-by-value and call-by-name systems. Our framework allows to capture the restriction to value polymorphism in the type structure and is exible enough to accommodate extensions of the type system, e.g., with higher-order polymorphism. The theoretical foundations make monadic type systems well-suited as a typed intermediate language for compilation and specialization of higher-order, strict and non-strict functional programs. The monadic structure guarantees sound compile-time optimizations and the parameterized type structure guarantees suucient expressiveness.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Realizing Monads in Interaction Nets via Generic Typed Rules

Interaction net systems are a model of computation based on graph rewriting. They enjoy various nice properties which make them a promising basis for a functional programming language. However, mechanisms to model impure functions are indispensable for a practical language. A natural approach to achieve this goal is the systematic use of monads. Yet, specifying the appropriate monads for impure...

متن کامل

Cost-analysis: How do monads and comonads differ?

Monads are a de facto standard for the type-based analysis of impure aspects of programs, such as runtime cost [9, 5]. Recently, the logical dual of a monad, the comonad, has also been used for the cost analysis of programs, in conjunction with a linear type system [6, 8]. The logical duality of monads and comonads extends to cost analysis: In monadic type systems, costs are (side) effects, whe...

متن کامل

Some new variants of interval-valued Gronwall type inequalities on time scales

By using an efficient partial order and concept of gH-differentiability oninterval-valued functions, we investigate some new variants of Gronwall typeinequalities on time scales, which provide explicit bounds on unknownfunctions. Our results not only unify and extend some continuousinequalities, but also in discrete case, all are new.

متن کامل

Fault Detection Based on Type 2 Fuzzy system for Single-Rod Electrohydraulic Actuator

Electro-hydraulic systems with regards to the their specific features and applications among other industrial systems including mechanical, electrical and pneumatic systems, have been widely taken into consideration by the scientists and researchers. Due to the fact that the electro-hydraulic system is inherently a nonlinear system, has some problems such as signals saturation, nonlinear effici...

متن کامل

From shift and reset to polarized linear logic

Griffin [22] pointed out that, just as the pure λ-calculus corresponds to intuitionistic logic, a λ-calculus with firstclass continuations corresponds to classical logic. We study how first-class delimited continuations [13], in the form of Danvy and Filinski’s shift and reset operators [10, 11], can also be logically interpreted. First, we refine Danvy and Filinski’s type system for shift and ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Electr. Notes Theor. Comput. Sci.

دوره 10  شماره 

صفحات  -

تاریخ انتشار 1997